//
//  LSZStudyPlanCollectionViewCell.m
//  PartyClassCloud
//
//  Created by 梁素珍 on 2018/8/23.
//  Copyright © 2018年 九酷. All rights reserved.
//

#import "LSZStudyPlanCollectionViewCell.h"

@implementation LSZStudyPlanCollectionViewCell
-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        UIView * viewBack = [[UIView alloc]init];
        [viewBack.layer setMasksToBounds:YES];
        [viewBack.layer setCornerRadius:8];
        viewBack.backgroundColor = [UIColor whiteColor];
        viewBack.frame = CGRectMake(0, 0, ScreenWidth-20, 200);
        [self addSubview:viewBack];
        
        self.imageViewBack = [[UIImageView alloc]init];
        self.imageViewBack.frame = CGRectMake(10, 10,viewBack.frame.size.width-20, viewBack.frame.size.height-20);
        [viewBack addSubview:self.imageViewBack];
        
        UIView * view = [[UIView alloc]init];
        view.backgroundColor = [UIColor blackColor];
        view.alpha = 0.3;
        view.frame = CGRectMake(0, self.imageViewBack.frame.size.height-40, self.imageViewBack.frame.size.width, 40);
        [self.imageViewBack addSubview:view];
        
        self.labelTitle = [[UILabel alloc]init];
        self.labelTitle.textColor = [UIColor whiteColor];
        self.labelTitle.frame = CGRectMake(0, self.imageViewBack.frame.size.height-40, self.imageViewBack.frame.size.width, 40);
        self.labelTitle.font = FONT_(16);
        [self.imageViewBack addSubview:self.labelTitle];
    }
    return self;
}
-(void)setLearningCatalogueMg:(LSZLearningCatalogueMg *)learningCatalogueMg
{
    [self.imageViewBack sd_setImageWithURL:[NSURL URLWithString: learningCatalogueMg.coverUrl] placeholderImage:[UIImage imageNamed:@"默认"]];
    self.labelTitle.text = learningCatalogueMg.name;
}
-(void)setSecondaryInterfaceMg:(LSZSecondaryInterfaceMg *)secondaryInterfaceMg
{
    NSLog(@"%@>>>>>>>>1",secondaryInterfaceMg.coverUrl);
    [self.imageViewBack sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@",secondaryInterfaceMg.coverUrl]] placeholderImage:[UIImage imageNamed:@"默认"]];
    self.labelTitle.text = secondaryInterfaceMg.name;
}
@end
